package com.example.demo.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Date:2021/6/30 13:34
 * @Author:郑伟
 * @Version:1.1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result<T> {
    private  T data;
    private int code;
    private String msg;
    public void ok(T data,int code,String msg){
        this.data=data;
        this.code=code;
        this.msg=msg;
    }
    public void error(int code,String msg){
        this.code=code;
        this.msg=msg;
    }

}